<?php
/* @var $this ActividadController */
/* @var $model Actividad */

$this->breadcrumbs=array(
        'Minuta'=>array('minuta/view','id' => $idMinuta),
	'Actividades'=>array('index', 'idMinuta' => $idMinuta),
	'Administrar',
);

$this->menu=array(
	array('label'=>'Listar Actividades', 'url'=>array('index', 'idMinuta' => $idMinuta)),
	array('label'=>'Crear Actividad', 'url'=>array('create', 'idMinuta' => $idMinuta)),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#actividad-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Administrar Actividades de la Minuta <?php echo str_pad((int) $idMinuta,5,"0",STR_PAD_LEFT); ?></h1>



<?php 

        $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'actividad-grid',
	'dataProvider'=>$model->search($idMinuta),
	//'filter'=>$model,
        'ajaxUpdate'=>false,
	'columns'=>array(
		'id',
		'descripcion',		
		array(			
                        'class'=>'CButtonColumn',
                        'template'=>'{view}{update}{delete}',
                        'buttons'=>array (
                                'view' => array (
                                    'url'=>'$this->grid->controller->createUrl("/actividad/view", array("id"=>$data->id,"idMinuta"=>'.$idMinuta.'))',                                     
                                ),
                                'update' => array (
                                    'url'=>'$this->grid->controller->createUrl("/actividad/update", array("id"=>$data->id,"idMinuta"=>'.$idMinuta.'))',                                     
                                ),
                                'delete' => array (
                                    'url'=>'$this->grid->controller->createUrl("/actividad/delete", array("id"=>$data->id,"idMinuta"=>'.$idMinuta.'))'                                        
                                ),
                        ),
		),                
	),
)); ?>
